﻿using System;
using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.club
{
    public class WhetherReceivePlayerChangeState : Message
    {
        public static int TYPE = 7;
        public static int ID = 48;

        private bool _isReceive;

        public bool IsReceive
        {
            get
            {
                return _isReceive;
            }

            set
            {
                _isReceive = value;
            }
        }

        public static WhetherReceivePlayerChangeState Create(bool isReceive)
        {
            WhetherReceivePlayerChangeState rpi = new WhetherReceivePlayerChangeState(); 
            rpi.IsReceive = isReceive;
            return rpi;
        }

        public void decode(Input _in)
        {
        }

        public void encode(Output _out)
        {
            _out.writeBoolean(IsReceive);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("isReceive=" + IsReceive);
        }
    }
} 